﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SeaBattle.Domain.Abstract.Services;
using SeaBattle.Domain.Entities;


namespace SeaBattle.Domain.Concrete.Services
{
    public class FakeAccountService: IAccountService
    {
        private static Dictionary<string, decimal> accountRests = new Dictionary<string, decimal>
        {
            {"vasya",10000},
            {"alex",500},
            {"andrew",300}
        };
        public decimal GetPlayerBalance(Player player)
        {
            if (accountRests.ContainsKey(player.Login))
            {
                return accountRests[player.Login];
            }
            throw new Exception("Player"+player.Name+"hasn't any balance");
        }
    }
}
